<@realgodo.html loc="">
<script type="text/javascript" src="${base}/scripts/user/vote/vote.js" language="javascript"></script>
	 <div class="co_m  bod padding">
	 	<form name="voteForm" id="voteForm" method="post" action="${base}/user/vote/index!vote">
	 		<input type="hidden" name="id" value="${id}"/>
				<div class="votedetail">
					<div class=" vd_head"> 
						<div class="vd_img"><a href="#" hidefocus ><img src="${base}/images/pp.jpg" /></a></div>
						<div class="vd_p">
							<p class="vd_font "><a href="#" hidefocus class="vd_weight mainColor" >${(vote.space.user.name)!}</a><span  class="vd_font vd_color9">发起的投票</span></p>
							<p class="vd_font vd_weight vd_color9 vd_no">V9<img src="${base}/images/bg.jpg"  /></p>
							<p class="vd_lp"><a href="#" hidefocus class="vd_color9">他的投票</a></p>
						</div>
						<div class="vd_clear"></div>
							<p class="vd_txt">发起：<#if vote.startTime?exists> ${vote.startTime?string("yyyy-MM-dd")} </#if></p>
							<p class="vd_txt">票数： <span class="mainColor"> ${vote.totalCount!}</span> </p>
							<p class="vd_txt">结束：<#if vote.endTime?exists> ${vote.endTime?string("yyyy-MM-dd")}</#if> </p>
					</div>
					<hr/>
					<div class="vd_mess">
						<p class="vd_weight vd_font vd_center"><a href="#" class="mainColor">${(vote.title)!}</a>&nbsp;&nbsp;&nbsp;
							<span class="vd_color9">(可选${vote.count}项) 
							</span>
						</p>
					</div>
									<#function coulor index=0>
										<#if index==0>
											<#return  "#7FFF00">
										</#if>
										<#if index==1>
											<#return  "#00FFFF">
										</#if>
										<#if index==2>
											<#return  "#87CEFA">
										</#if>
										<#if index==3>
											<#return  "#FFFF00">
										</#if>
										<#if index==4>
											<#return  "#000000">
										</#if>
										<#if index==5>
											<#return  "#DC143C">
										</#if>
										<#if index==6>
											<#return  "#FFFACD">
										</#if>
									</#function>
					<div>
						<div style="float:left; margin-top:20px">
							<table cellpadding="0" cellspacing="5" border="0" width="400px">
								<#list items as item>
									
								<tr>
									<td class="vd_txt"  width="30%" align="right" valign="bottom">${item.title!}:</td>
									<td  width="150px" bgcolor="${coulor(item_index)}"></td><td class="vd_txt" valign="bottom" align="left">${item.voteCount!}(${item.percent!}%)</td><td width="5%">
										<#if vote.status==0><input type="checkbox"  class="vd_btt voteitem" name="ids" value="${item.id}"/></#if>
									</td>
								</tr>
								</#list>
							</table>
						</div>
						<div style="float:left; margin-top:20px; margin-left:10px"> <#if vote.status==0><input type="button" class="vd_btt"  value=" 投票 " onClick="vote(${vote.count})"/></#if></div>
					</div>
				</div>
		</form>

		<hr/>
		<@realgodo.comment_tag application_id="${(vote.id?c)!}" />
	</div>
</@realgodo.html>
				
				
<script>				
$().ready(function() {
	  $("#poll-results div").each(function(){
      var percentage = $(this).next().text();
      $(this).css({width: "0%"}).animate({
				width: percentage}, 'slow');
  });
});
</script>
<style type="text/css">
body {
	font-family: arial, verdana, helvetica, sans-serif;
	font-size: 12px;
	cursor: default;
	background-color: #FFFFFF
}
* {
	margin: 0px;
	padding: 0px;
	text-decoration: none;
}
html {
	height: 100%;
	margin-bottom: 1px;
}
#container {
	width: 80%;
	margin-right: auto;
	margin-left: auto;
	text-align: left;
	background-color: #FFFFFF;
}
#header {
	width: 100%;
	padding-top: 15px;
}
.spacer {
	width: 100%;
	height: 15px;
}
hr {
	border: 0px;
	color: #CCCCCC;
	background-color: #CDCDCD;
	height: 1px;
	width: 100%;
	text-align: left;
}
h1 {
	font-size: 28px;
	color: #cc0000;
	background-color: #FFFFFF;
	font-family: Arial, Verdana, Helvetica, sans-serif;
	font-weight: 300;
}
h2 {
	font-size: 15px;
	color: gray;
	font-family: Arial, Verdana, Helvetica, sans-serif;
	font-weight: 300;
	background-color: #FFFFFF;
}
h3 {
	color: #cc0000;
	font-size: 15px;
	text-align: left;
	font-weight: 300;
	padding: 5px;
	margin-top: 5px;
}

#left {
	float: left;
	width: 250px;
	background-color: #FFFFFF;
	color: black;
}

#main {
	margin: 5px 5px 5px 260px;
	padding: 15px;
	border-left: 1px solid silver;
}
a:hover {
	color: #cc0000;
	background-color: #FFFFFF;
	text-decoration: underline;
}
#footer {
	clear: both;
	font-size: 12px;
	font-family: Verdana, Arial, Helvetica, sans-serif;
}
.right {
	color: gray;
	background-color: #FFFFFF;
	float: right;
	font-size: 100%;
	margin-top: 5px;
}
.left {
	color: gray;
	background-color: #FFFFFF;
	float: left;
	font-size: 100%;
	margin-top: 5px;
}

/* Bar Graphs */
.graph {
  width: 400px;
  position: relative;
  right: 10px;
}
.bar-title {
  position: relative;
  float: left;
  width: 200px;
  line-height: 20px;
  margin-right: 17px;
  font-weight: bold;
  text-align: right;
}
.bar-container {
  position: relative;
  float: left;
  width: 150px;
  height: 10px;
  margin: 0px 0px 15px;
}

.bar-container div {
  background-color:#0000FF;
  height: 20px;
}
.bar-container strong {
  position: absolute;
  right: -32px;
  top: 0px;
  overflow: hidden;
}
#poll-results p {
  text-align: center;
}
</style>